/*
 * Bson.cpp
 *
 *  Created on: 2013. 12. 11.
 *      Author: the2
 */

#include "Bson.h"

namespace ProjectZ { namespace NGameLog {

Bson::Bson() {
	_collections.clear();
	_pBson = new bson;
}

Bson::~Bson() {
	_collections.clear();
	delete _pBson;
}

void
Bson::Initialize()
{
	_collections = "pz_user.";
	bson_init ( _pBson );
}

void
Bson::Finalize()
{
	_collections.clear();
	bson_destroy ( _pBson );
}

void
Bson::SetCollections(std::string collections)
{
	_collections.append(collections);
}

std::string
Bson::GetCollections()
{
	return _collections;
}

bson *
Bson::GetBsonData()
{
	return _pBson;
}

} /* namespace NGameLog */
} /* namespace ProjectZ */
